<?php

/**
 * Devolmv form base class.
 *
 * @method Devolmv getObject() Returns the current form's model object
 *
 * @package    exproaqua
 * @subpackage form
 * @author     Luis Hernández
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseDevolmvForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_empresa'        => new sfWidgetFormInputText(),
      'agencia'           => new sfWidgetFormInputText(),
      'tipodoc'           => new sfWidgetFormInputHidden(),
      'documento'         => new sfWidgetFormInputHidden(),
      'grupo'             => new sfWidgetFormInputText(),
      'subgrupo'          => new sfWidgetFormInputText(),
      'origen'            => new sfWidgetFormInputText(),
      'codigo'            => new sfWidgetFormInputHidden(),
      'codhijo'           => new sfWidgetFormInputHidden(),
      'pid'               => new sfWidgetFormInputHidden(),
      'nombre'            => new sfWidgetFormInputText(),
      'costounit'         => new sfWidgetFormInputText(),
      'preciounit'        => new sfWidgetFormInputText(),
      'diferencia'        => new sfWidgetFormInputText(),
      'dsctounit'         => new sfWidgetFormInputText(),
      'dsctoprc'          => new sfWidgetFormInputText(),
      'dsctoendm'         => new sfWidgetFormInputText(),
      'dsctoendp'         => new sfWidgetFormInputText(),
      'dscto1prc'         => new sfWidgetFormInputText(),
      'dscto2prc'         => new sfWidgetFormInputText(),
      'dscto3prc'         => new sfWidgetFormInputText(),
      'dscto4prc'         => new sfWidgetFormInputText(),
      'dscto5prc'         => new sfWidgetFormInputText(),
      'preciofin'         => new sfWidgetFormInputText(),
      'prcrecargo'        => new sfWidgetFormInputText(),
      'recargouni'        => new sfWidgetFormInputText(),
      'precioorig'        => new sfWidgetFormInputText(),
      'cantidad'          => new sfWidgetFormInputText(),
      'cntdevuelt'        => new sfWidgetFormInputText(),
      'cntentrega'        => new sfWidgetFormInputText(),
      'tallas'            => new sfWidgetFormInputText(),
      'colores'           => new sfWidgetFormInputText(),
      'montoneto'         => new sfWidgetFormInputText(),
      'montototal'        => new sfWidgetFormInputText(),
      'almacen'           => new sfWidgetFormInputText(),
      'proveedor'         => new sfWidgetFormInputText(),
      'fechadoc'          => new sfWidgetFormDate(),
      'impuesto1'         => new sfWidgetFormInputText(),
      'impuesto2'         => new sfWidgetFormInputText(),
      'impuesto3'         => new sfWidgetFormInputText(),
      'impuesto4'         => new sfWidgetFormInputText(),
      'impuesto5'         => new sfWidgetFormInputText(),
      'impuesto6'         => new sfWidgetFormInputText(),
      'timpueprc'         => new sfWidgetFormInputText(),
      'impu_mto'          => new sfWidgetFormInputText(),
      'unidad'            => new sfWidgetFormInputText(),
      'comision'          => new sfWidgetFormInputText(),
      'comisprc'          => new sfWidgetFormInputText(),
      'vendedor'          => new sfWidgetFormInputText(),
      'emisor'            => new sfWidgetFormInputText(),
      'usaserial'         => new sfWidgetFormInputText(),
      'tipoprecio'        => new sfWidgetFormInputText(),
      'agrupado'          => new sfWidgetFormInputText(),
      'seimporto'         => new sfWidgetFormInputText(),
      'desdeimpor'        => new sfWidgetFormInputText(),
      'notas'             => new sfWidgetFormTextarea(),
      'oferta'            => new sfWidgetFormInputText(),
      'compuesto'         => new sfWidgetFormInputText(),
      'usaexist'          => new sfWidgetFormInputText(),
      'marca'             => new sfWidgetFormInputText(),
      'aux1'              => new sfWidgetFormInputText(),
      'estacion'          => new sfWidgetFormInputText(),
      'clasifica'         => new sfWidgetFormInputText(),
      'cuentacont'        => new sfWidgetFormInputText(),
      'turno'             => new sfWidgetFormInputText(),
      'cntagrupada'       => new sfWidgetFormInputText(),
      'udinamica'         => new sfWidgetFormInputText(),
      'cantref'           => new sfWidgetFormInputText(),
      'unidadref'         => new sfWidgetFormInputText(),
      'baseimpo1'         => new sfWidgetFormInputText(),
      'baseimpo2'         => new sfWidgetFormInputText(),
      'baseimpo3'         => new sfWidgetFormInputText(),
      'lote'              => new sfWidgetFormInputText(),
      'imp_nacional'      => new sfWidgetFormInputText(),
      'imp_producc'       => new sfWidgetFormInputText(),
      'sinimpuest'        => new sfWidgetFormInputText(),
      'isrma'             => new sfWidgetFormInputText(),
      'serialesrma'       => new sfWidgetFormTextarea(),
      'almacenrma'        => new sfWidgetFormInputText(),
      'ofertaconvenio'    => new sfWidgetFormInputText(),
      'cod_servidor'      => new sfWidgetFormInputText(),
      'prc_comi_servidor' => new sfWidgetFormInputText(),
      'mto_comi_servidor' => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'id_empresa'        => new sfValidatorString(array('max_length' => 6)),
      'agencia'           => new sfValidatorString(array('max_length' => 3, 'required' => false)),
      'tipodoc'           => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'tipodoc', 'required' => false)),
      'documento'         => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'documento', 'required' => false)),
      'grupo'             => new sfValidatorString(array('max_length' => 6, 'required' => false)),
      'subgrupo'          => new sfValidatorString(array('max_length' => 6, 'required' => false)),
      'origen'            => new sfValidatorNumber(array('required' => false)),
      'codigo'            => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'codigo', 'required' => false)),
      'codhijo'           => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'codhijo', 'required' => false)),
      'pid'               => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'pid', 'required' => false)),
      'nombre'            => new sfValidatorString(array('max_length' => 80, 'required' => false)),
      'costounit'         => new sfValidatorNumber(array('required' => false)),
      'preciounit'        => new sfValidatorNumber(array('required' => false)),
      'diferencia'        => new sfValidatorNumber(array('required' => false)),
      'dsctounit'         => new sfValidatorNumber(array('required' => false)),
      'dsctoprc'          => new sfValidatorNumber(array('required' => false)),
      'dsctoendm'         => new sfValidatorNumber(array('required' => false)),
      'dsctoendp'         => new sfValidatorNumber(array('required' => false)),
      'dscto1prc'         => new sfValidatorNumber(array('required' => false)),
      'dscto2prc'         => new sfValidatorNumber(array('required' => false)),
      'dscto3prc'         => new sfValidatorNumber(array('required' => false)),
      'dscto4prc'         => new sfValidatorNumber(array('required' => false)),
      'dscto5prc'         => new sfValidatorNumber(array('required' => false)),
      'preciofin'         => new sfValidatorNumber(array('required' => false)),
      'prcrecargo'        => new sfValidatorNumber(array('required' => false)),
      'recargouni'        => new sfValidatorNumber(array('required' => false)),
      'precioorig'        => new sfValidatorNumber(array('required' => false)),
      'cantidad'          => new sfValidatorNumber(array('required' => false)),
      'cntdevuelt'        => new sfValidatorNumber(array('required' => false)),
      'cntentrega'        => new sfValidatorNumber(array('required' => false)),
      'tallas'            => new sfValidatorString(array('max_length' => 3, 'required' => false)),
      'colores'           => new sfValidatorString(array('max_length' => 3, 'required' => false)),
      'montoneto'         => new sfValidatorNumber(array('required' => false)),
      'montototal'        => new sfValidatorNumber(array('required' => false)),
      'almacen'           => new sfValidatorString(array('max_length' => 2, 'required' => false)),
      'proveedor'         => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'fechadoc'          => new sfValidatorDate(array('required' => false)),
      'impuesto1'         => new sfValidatorNumber(array('required' => false)),
      'impuesto2'         => new sfValidatorNumber(array('required' => false)),
      'impuesto3'         => new sfValidatorNumber(array('required' => false)),
      'impuesto4'         => new sfValidatorNumber(array('required' => false)),
      'impuesto5'         => new sfValidatorNumber(array('required' => false)),
      'impuesto6'         => new sfValidatorNumber(array('required' => false)),
      'timpueprc'         => new sfValidatorNumber(array('required' => false)),
      'impu_mto'          => new sfValidatorNumber(array('required' => false)),
      'unidad'            => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'comision'          => new sfValidatorNumber(array('required' => false)),
      'comisprc'          => new sfValidatorNumber(array('required' => false)),
      'vendedor'          => new sfValidatorString(array('max_length' => 8, 'required' => false)),
      'emisor'            => new sfValidatorString(array('max_length' => 8, 'required' => false)),
      'usaserial'         => new sfValidatorNumber(array('required' => false)),
      'tipoprecio'        => new sfValidatorNumber(array('required' => false)),
      'agrupado'          => new sfValidatorNumber(array('required' => false)),
      'seimporto'         => new sfValidatorNumber(array('required' => false)),
      'desdeimpor'        => new sfValidatorString(array('max_length' => 11, 'required' => false)),
      'notas'             => new sfValidatorString(array('required' => false)),
      'oferta'            => new sfValidatorNumber(array('required' => false)),
      'compuesto'         => new sfValidatorNumber(array('required' => false)),
      'usaexist'          => new sfValidatorNumber(array('required' => false)),
      'marca'             => new sfValidatorNumber(array('required' => false)),
      'aux1'              => new sfValidatorNumber(array('required' => false)),
      'estacion'          => new sfValidatorString(array('max_length' => 3, 'required' => false)),
      'clasifica'         => new sfValidatorNumber(array('required' => false)),
      'cuentacont'        => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'turno'             => new sfValidatorString(array('max_length' => 2, 'required' => false)),
      'cntagrupada'       => new sfValidatorNumber(array('required' => false)),
      'udinamica'         => new sfValidatorNumber(array('required' => false)),
      'cantref'           => new sfValidatorNumber(array('required' => false)),
      'unidadref'         => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'baseimpo1'         => new sfValidatorNumber(array('required' => false)),
      'baseimpo2'         => new sfValidatorNumber(array('required' => false)),
      'baseimpo3'         => new sfValidatorNumber(array('required' => false)),
      'lote'              => new sfValidatorString(array('max_length' => 30, 'required' => false)),
      'imp_nacional'      => new sfValidatorNumber(array('required' => false)),
      'imp_producc'       => new sfValidatorNumber(array('required' => false)),
      'sinimpuest'        => new sfValidatorNumber(array('required' => false)),
      'isrma'             => new sfValidatorNumber(array('required' => false)),
      'serialesrma'       => new sfValidatorString(array('required' => false)),
      'almacenrma'        => new sfValidatorString(array('max_length' => 2, 'required' => false)),
      'ofertaconvenio'    => new sfValidatorNumber(array('required' => false)),
      'cod_servidor'      => new sfValidatorString(array('max_length' => 8, 'required' => false)),
      'prc_comi_servidor' => new sfValidatorNumber(array('required' => false)),
      'mto_comi_servidor' => new sfValidatorNumber(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('devolmv[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Devolmv';
  }

}
